<div class="control-group">
  <label class="control-label" for="group_name">{{#t "group_name"}}Group Name{{/t}}</label>
  <div class="controls">
    <input type="text" id="group_name" name='name' value="{{name}}" aria-required="true"
           placeholder="{{#t "group_name"}}Group Name{{/t}}">
  </div>
</div>
{{#unless nameOnly}}
{{#ifEqual role "student_organized"}}
<div class="control-group">
  <label class="control-label" for="group_join_level">{{#t "group_join_level"}}Joining{{/t}}</label>
  <div class="controls">
    <select id="group_join_level" name="join_level">
      <option value="parent_context_auto_join">{{#t "open"}}Members are free to join{{/t}}</option>
      <option value="invitation_only" {{selectedIf join_level "invitation_only"}}>{{#t "invitation_only"}}Invitation only{{/t}}</option>
    </select>
  </div>
</div>
{{else}}
<div class="control-group">
  <label class="control-label" for="group_max_membership">{{#t "group_max_membership"}}Limit groups to{{/t}}</label>
  <div class="controls">
    <input type="number" id="group_max_membership" name='max_membership' value="{{max_membership}}" class="input-mini" min="2">
    <span>{{#t "group_max_membership_members"}}members{{/t}}</span>
    <span class="hint-text">{{#t "group_max_membership_help"}}(Leave blank to use group set max){{/t}}</span>
  </div>
</div>
{{/ifEqual}}
{{/unless}}

<div class="form-controls">
  <button class="btn dialog_closer" type="button"
          data-dismiss='modal'>{{#t "cancel"}}Cancel{{/t}}</button>
  <button class="btn btn-primary"
          id="groupEditSaveButton"
          data-text-while-loading='{{#t "saving"}}Saving...{{/t}}'
          type="submit">{{#t "save"}}Save{{/t}}</button>
</div>
